package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 书籍章节表(Chapter)实体类
 *
 * @author 杨丽辉
 * @since 2021-03-18 16:30:28
 */
@ApiModel("书籍章节表")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Chapter implements Serializable {
    private static final long serialVersionUID = 611023327884639400L;
        /**
    *主键
    * 书籍章节id
    * isnull 1
    */
    @ApiModelProperty(value="书籍章节id", position=1)
    @TableId(type = IdType.ASSIGN_ID)
    private String chapterId;

    /**
    * 章节名称(第几章+章节名称的格式)
    * isnull 0
    */        @ApiModelProperty(value="章节名称(第几章+章节名称的格式)",position=2)
    private String chapterName;
    /**
    * 书籍id
    * isnull 0
    */        @ApiModelProperty(value="书籍id",position=3)
    private String bookId;
    /**
    * 章节内容
    * isnull 0
    */        @ApiModelProperty(value="章节内容",position=4)
    private String chapterContent;
    /**
    * 章节评论数
    * isnull 0
    */        @ApiModelProperty(value="章节评论数",position=5)
    private Integer chapterCommentCount;
    /**
    * 章节更新时间
    * isnull 0
    */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value="章节更新时间",position=6)
    private LocalDateTime updateTime;
    /**
    * 章节修改时间
    * isnull 0
    */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        @ApiModelProperty(value="章节修改时间",position=7)
    private LocalDateTime modifyTime;
    /**
    * 作者有话说
    * isnull 0
    */        @ApiModelProperty(value="作者有话说",position=8)
    private String authorWords;
    /**
    * 分卷（0：正文；1：番外）
    * isnull 0
    */        @ApiModelProperty(value="分卷（0：正文；1：番外）",position=9)
    private Integer segment;
    /**
    * 章节是否锁定（0：未锁定；1：已锁定,默认为未锁定
    * isnull 0
    */        @ApiModelProperty(value="章节是否锁定（0：未锁定；1：已锁定,默认为未锁定",position=10)
    private Integer lockStatus;
    /**
    * 章节内容字数
    * isnull 0
    */        @ApiModelProperty(value="章节内容字数",position=11)
    private Integer chapterContentCount;
    /**
    * 章节所需积分
    * isnull 0
    */        @ApiModelProperty(value="章节所需积分",position=12)
    private Integer chapterPoints;
    /**
    * 是否免费（0：免费；1：不免费）
    * isnull 0
    */        @ApiModelProperty(value="是否免费（0：免费；1：不免费）",position=13)
    private Integer isFree;
        
    public String getChapterId() {
        return chapterId;
    }

    public void setChapterId(String chapterId) {
        this.chapterId = chapterId;
    }
        
    public String getChapterName() {
        return chapterName;
    }

    public void setChapterName(String chapterName) {
        this.chapterName = chapterName;
    }
        
    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }
        
    public String getChapterContent() {
        return chapterContent;
    }

    public void setChapterContent(String chapterContent) {
        this.chapterContent = chapterContent;
    }
        
    public Integer getChapterCommentCount() {
        return chapterCommentCount;
    }

    public void setChapterCommentCount(Integer chapterCommentCount) {
        this.chapterCommentCount = chapterCommentCount;
    }
        
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
        
    public LocalDateTime getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(LocalDateTime modifyTime) {
        this.modifyTime = modifyTime;
    }
        
    public String getAuthorWords() {
        return authorWords;
    }

    public void setAuthorWords(String authorWords) {
        this.authorWords = authorWords;
    }
        
    public Integer getSegment() {
        return segment;
    }

    public void setSegment(Integer segment) {
        this.segment = segment;
    }
        
    public Integer getLockStatus() {
        return lockStatus;
    }

    public void setLockStatus(Integer lockStatus) {
        this.lockStatus = lockStatus;
    }
        
    public Integer getChapterContentCount() {
        return chapterContentCount;
    }

    public void setChapterContentCount(Integer chapterContentCount) {
        this.chapterContentCount = chapterContentCount;
    }
        
    public Integer getChapterPoints() {
        return chapterPoints;
    }

    public void setChapterPoints(Integer chapterPoints) {
        this.chapterPoints = chapterPoints;
    }
        
    public Integer getIsFree() {
        return isFree;
    }

    public void setIsFree(Integer isFree) {
        this.isFree = isFree;
    }

        @Override
    public String toString() {
        return "{" +
                    " \"chapterId\":" + chapterId +
                                  " ,\"chapterName\":" + chapterName +
                            " ,\"bookId\":" + bookId +
                            " ,\"chapterContent\":" + chapterContent +
                            " ,\"chapterCommentCount\":" + chapterCommentCount +
                            " ,\"updateTime\":" + updateTime +
                            " ,\"modifyTime\":" + modifyTime +
                            " ,\"authorWords\":" + authorWords +
                            " ,\"segment\":" + segment +
                            " ,\"lockStatus\":" + lockStatus +
                            " ,\"chapterContentCount\":" + chapterContentCount +
                            " ,\"chapterPoints\":" + chapterPoints +
                            " ,\"isFree\":" + isFree +
                  '}';
    }


}
